﻿using System;
using System.Web.UI;

namespace Accumulation.Controls.Calendars {
    internal class Helper {
        internal static string GetLanguageCode(LanguageEnum s) {
            switch (s) {
                case LanguageEnum.ZH:
                    return "cn";
                case LanguageEnum.ZHT:
                    return "hk";
                case LanguageEnum.EN:
                    return "en";
                default:
                    return "cn";
            }
        }
        internal static string GetTypeOut(TypeOutEnum s) {
            return s.ToString();
        }
        internal static string GetWebResourceUrl(string urlName, Control control) {
            return control.Page.ClientScript.GetWebResourceUrl(control.GetType(), urlName);
        }
        internal static int GetCssStyle(CSSEnum css) {
            return Convert.ToInt32(css);
        }
        internal static string GetBool(bool value) {
            return value.ToString().ToLower();
        }
        internal static string GetDate(DateTime dt) {
            return String.Format("{0}-{1}-{2}", dt.Year, dt.Month, dt.Day);
        }
    }
    /// <summary>
    /// 样式选择
    /// </summary>
    public enum CSSEnum {
        /// <summary>
        /// 样式一
        /// </summary>
        One = 1,
        /// <summary>
        /// 样式二
        /// </summary>
        Two = 2,
        /// <summary>
        /// 样式三
        /// </summary>
        Three = 3,
        /// <summary>
        /// 样式四
        /// </summary>
        Four = 4,
        /// <summary>
        /// 样式五
        /// </summary>
        Five = 5,
        /// <summary>
        /// 样式六
        /// </summary>
        Six = 6,
        /// <summary>
        /// 样式七
        /// </summary>
        Seven = 7,
        /// <summary>
        /// 样式八
        /// </summary>
        Eight = 8,
        /// <summary>
        /// 样式九
        /// </summary>
        Nine = 9
    }
    /// <summary>
    /// 语言类型
    /// </summary>
    public enum LanguageEnum {
        /// <summary>
        /// 简体中文
        /// </summary>
        ZH,
        /// <summary>
        /// 繁体中文
        /// </summary>
        ZHT,
        /// <summary>
        /// 英文
        /// </summary>
        EN,
    }
    /// <summary>
    /// 输出日历类型
    /// </summary>
    public enum TypeOutEnum {
        /// <summary>
        /// 日期和时间
        /// </summary>
        All,
        /// <summary>
        /// 日期
        /// </summary>
        Date,
        /// <summary>
        /// 年份
        /// </summary>
        Year,
        /// <summary>
        /// 月份
        /// </summary>
        Month,
        /// <summary>
        /// 日
        /// </summary>
        Day,
        /// <summary>
        /// 时
        /// </summary>
        Hour,
        /// <summary>
        /// 分
        /// </summary>
        Minute
    }
}